To begin placing orders on Regolith, merchants can access the inventory endpoint to view available items, including the country they are available in and the VAT for that country. Follow these steps to manage inventory:
GET /api/v1/Inventory/allInventory – Retrieves a list of available items.
To place orders for items and equipment, merchants need to add items to their cart and then proceed to place the order. Follow these steps to place orders:
While it is possible to add multiple items to the cart, please only add items that are to be delivered to one person at a time, as all items in cart would automatically be added when an order is being created.
GET /api/v1/Carts/getCartItems – Gets all items in cart.
POST /api/v1/Carts/addCartItem – Adds an item to cart.
PUT /api/v1/Carts/updateCartItem/{cartId} – Updates a cart item.
DELETE /api/v1/Carts/deleteCartItem/{cartId} – Deletes a cart item.
Add to Cart Payload Example:
{
"itemId": 123,
"quantity": 2
}
Order Payload Example:
{
"employer": “Facebook”,
"buyerName": "John Doe",
"assignee": "Jane Smith",
"assigneeRole": "Manager",
"shippingAddress": {
"countryId": 0,
"address": "123 Main St",
"city": "City",
"state": "State",
"phoneNumber": "123-456-7890"
}
}
Once orders are created, merchants get debited for the orders via the card earlier
connected. Merchants can also view all their orders, order details using the orderId,
and the status of their orders through the following endpoints:
Merchants can configure their payment settings and specify preferences for making
payments, including immediate payments for onboarding, purchase of items, and repairs of items. Use the payment settings APIs to manage payment preferences:
Merchants can use the repair APIs to request repairs of items from their staff. The
POST /api/v1/Repairs endpoint allows merchants to make a request for an item to
be repaired. The payload should include the following information:
Example Payload:
{
"assignedItemId": 123,
"itemId": 456,
"issues": "Laptop screen cracked"
}
To check repair requests you have made, this endpoint should be called:
GET /api/v1/Repairs
To check details of a repair request, call
GET /api/v1/Repairs/getSingleRequest/{requestId} passing in your requestId as a route params.
To get the assignedItemId, merchants can call the GET/api/v1/AssignedItems/merchantAssigned endpoint. This endpoint returns a
paginated list of all assigned items by a merchant. It also takes in an optional query
parameter, Employer, which can be used to filter the list based on employer names.
After making a repair request, merchants can view a list of all the repair requests they have made via the repair request APIs. They can also cancel a request if needed. GET /api/v1/Repairs